package opdracht3;

/**
 * Class that serves as the basis for each of the visitor types, extends from
 * thread.
 * 
 * @author Sander & Dave
 * 
 */
public abstract class Visitor extends Thread {

	private Autoshow show;

	/**
	 * Constructor.
	 * 
	 * @param name
	 *            Name of the visitor.
	 * @param show
	 *            the show being visited by the visitor.
	 */
	public Visitor(String name, Autoshow show) {
		super(name);
		this.show = show;
	}

	/**
	 * Method to represent the visitor to just live his life outside the
	 * autoshow.
	 */
	public void justLive() {
		try {
			System.out.println(super.getName() + " is just living.");
			Thread.sleep((int) (Math.random() * 10000));
		} catch (InterruptedException e) {

		}
	}

	public Autoshow getShow() {
		return show;
	}

	public void setShow(Autoshow show) {
		this.show = show;
	}
}
